package com.etc.service;

import com.etc.entity.User;
import com.etc.util.PageData;

public interface UserService {
    boolean deleteByPrimaryKey(Integer userid);

    boolean insert(User record);

    boolean insertSelective(User record);

    User selectByPrimaryKey(Integer userid);

    boolean updateByPrimaryKeySelective(User record);

    boolean updateByPrimaryKey(User record);

    // 分页加模糊查询
    PageData<User> selectByPage(int page, int limit, String content);

    //管理员登录校验
    boolean selectByUser(User user);

    //根据用户名校验
    boolean selectByUserName(String username);

    User selectByTel(String tel);

    User selectByEmail(String email);

    //普通用户登录校验
    User checkByUser(User user);

    //用户注册
    boolean insertUser(User user);

    boolean updateStauts(int userid);

    User getUserByTel(String tel);

    boolean insertByTel(User user);

    /**
     * 查询数据库是否有相同的名的用户
     * @param user
     * @return
     */
    boolean getOtherUser(User user);
}
